<template>
  <div>
    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
      <el-form-item label="类型：" prop="configType">
        <el-radio-group v-model="form.configType">
          <el-radio :label="1">充值</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="金额：" prop="money">
        <el-input v-model="form.money" placeholder="请输入金额" type="number" />
      </el-form-item>
      <el-form-item label="类型：" prop="type">
        <el-select
          v-model="form.type"
          placeholder="请选择类型"
          clearable
          filterable
          style="width: 100%"
        >
          <el-option
            v-for="(item, index) in typelist"
            :key="index"
            :label="item.name"
            :value="item.id"
          >
          </el-option>
        </el-select>
      </el-form-item>
    </el-form>
    <div class="flexend">
      <el-button type="primary" @click="submitForm">确 定</el-button>
      <el-button @click="cancel">取 消</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        configType:1,
        type:1,
        money:''
      },
      rules: {},
      typelist: [
        { id: 1, name: "红包充值" },
        { id: 2, name: "旗舰版" },
        { id: 3, name: "砖石版" },
      ],
    };
  },
  methods: {
    submitForm() {
      this.$refs.form.validate((valid) => {
        if (!valid) return;
      });
    },

    cancel(){
        this.$emit('close')
    }
  },
};
</script>

<style lang="scss" scoped>
</style>

